package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.annotations.ExcelColumnSelect;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.system.controller.admin.user.YmAreaExcelFunction;
import cn.iocoder.yudao.module.system.controller.admin.user.YmDeptExcelFunction;
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 用户 Excel 导入 VO
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
public class UserImportExcelVO {

    @ExcelProperty("登录账号")
    private String username;

    @ExcelProperty("用户名称")
    private String nickname;

    @ExcelProperty("手机号码")
    private String mobile;

    @ExcelProperty("工号")
    private String employeeNum;

    @ExcelProperty("公司")
    @ExcelColumnSelect(functionName = YmDeptExcelFunction.NAME)
    private String deptName;

//    @ExcelProperty(value = "用户性别", converter = DictConvert.class)
//    @DictFormat(DictTypeConstants.USER_SEX)
//    @ExcelColumnSelect(dictType = DictTypeConstants.USER_SEX)
//    @ExcelIgnore
//    private Integer sex;

    @ExcelProperty(value = "账号状态", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.COMMON_STATUS)
    @ExcelColumnSelect(dictType = DictTypeConstants.COMMON_STATUS)
    private Integer status;

    @ExcelProperty("负责区域,多个用'|'隔开")
//    @ExcelColumnSelect(functionName = YmAreaExcelFunction.NAME)
    private String areaIds;

    @ExcelProperty("负责电站,多个用'|'隔开")
    private String siteIds;

    @ExcelProperty("角色,多个用'|'隔开")
//    @ExcelColumnSelect(dictType = DictTypeConstants.COMMON_STATUS)
    private String roleIds;

    @ExcelIgnore
    private Long deptId;

}
